package com.jintian.smart.kernel.oss.mapper;

import com.jintian.smart.kernel.core.file.FileQueryForm;
import com.jintian.smart.kernel.core.file.FileVO;
import com.jintian.smart.kernel.orm.mapper.IBaseExtMapper;
import com.jintian.smart.kernel.oss.domain.entity.FileEntity;
import org.beetl.sql.core.page.PageResult;
import org.beetl.sql.mapper.annotation.Mapper;
import org.beetl.sql.mapper.annotation.Param;
import org.beetl.sql.mapper.annotation.SqlResource;


import java.util.Collection;
import java.util.List;

/**
 * 文件服务
 */
@Mapper
@SqlResource("oss.File")
public interface FileMapper extends IBaseExtMapper<FileEntity> {
    /**
     * 文件key单个查询
     *
     * @param fileKey
     * @return
     */
    FileVO getByFileKey(@Param("fileKey") String fileKey);


    /**
     * 批量获取
     */
    List<FileVO> selectByFileKeyList(@Param("fileKeyList") Collection<String> fileKeyList);

    /**
     * 分页 查询
     *
     * @param queryForm
     * @return
     */
    PageResult<FileVO> queryPage(@Param("queryForm") FileQueryForm queryForm);
}
